package models;

import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Transient;

import play.db.jpa.Model;

@Entity
public class Matricula extends Model {

	public boolean matriculaPaga;
	public boolean materialPago;
	public boolean parcelado;
	public int numParcelas;
	public Double valorDeEntrada;
	public boolean cancelada;
	@Column(nullable = false)
	public Date data;
	@Transient
	public String status;

	@OneToMany(mappedBy = "matricula")
	public List<Transferencia> transferencias;

	@ManyToOne(cascade = { CascadeType.ALL }, optional = false)
	@JoinColumn(name = "ALUNO_PK")
	public Aluno aluno;

	@ManyToOne(cascade = { CascadeType.ALL }, optional = false)
	@JoinColumn(name = "TURMA_PK")
	public Turma turma;
}
